import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    path: "/admin",
    component: () => import("@/pages/layout/Index.vue"),
    children: [
      {
        name: "",
        path: "list",
        component: () => import("@/pages/list/Index.vue"),
      },
      {
        path: "function-list",
        component: () => import("@/pages/function-list/Index.vue"),
      }
    ],
  },
  {
    path: "/data-manage",
    component: () => import("@/pages/data-manage/Index.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
